html,
body,
div {
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    font-family: 'Microsoft Yahei', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    background-color: rgba(204, 204, 204, 0.12);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrapper {
    width: 960px;
    height: auto;
    margin: 0 auto;
}

.title {
    text-align: center;
    color: #bd397c;
}

.title h1 {
    font-size: 44px;
    letter-spacing: 5px;
    text-shadow: 1px 1px #ddd;
}

.main {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 15px;
    background-color: #fff;
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.circle {
    width: 65px;
    height: 65px;
    box-sizing: border-box;
    border-radius: 50%;
    cursor: pointer;
}

.trash {
    position: absolute;
    top: 25px;
    right: 25px;
    background-image: url(../img/delete.jpg);
    background-size: cover;
    box-shadow: inset 0px 0px 10px #ddd;
    border: 1px solid #d1d1d1;
}

.trash:active {
    border: 2px solid #d2d2d2;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: url(../img/cursor.png) 0 17, default;
    cursor: -webkit-image-set(url(../img/cursor.png) 1x, url(../img/cursor.png) 2x) 0 17, default;
}

.line-picker {
    position: absolute;
    bottom: 25px;
    left: 50%;
    height: 60px;
    transform: translateX(-50%);
}

.line-item {
    display: inline-block;
    vertical-align: middle;
    background-color: rgb(32, 128, 205);
    margin: 2px;
    border-radius: 50%;
    box-sizing: border-box;
    cursor: pointer;
}

.line-item.active {
    border: 2px solid #f17b15;
}

.line-item:nth-child(1) {
    width: 15px;
    height: 15px;
}

.line-item:nth-child(2) {
    width: 20px;
    height: 20px;
}

.line-item:nth-child(3) {
    width: 25px;
    height: 25px;
}

.line-item:nth-child(4) {
    width: 35px;
    height: 35px;
}

.line-item:nth-child(5) {
    width: 40px;
    height: 40px;
}

.tools {
    vertical-align: middle;
}

.tools > div {
    display: inline-block;
}

.draw-mode {
    position: absolute;
    bottom: 25px;
    right: 25px;
}

.mode-item {
    display: inline-block;
    margin-left: 10px;
    background-size: 130%;
    background-position: center;
}

.eraser {
    background-image: url(../img/img-2.jpg);
}

.draw {
    background-image: url(../img/img-1.jpg);
}

.mode-item.active {
    box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
}

.color-picker-wrap {
    position: absolute;
    bottom: 25px;
    left: 60px;
    transition: all .5s;
}

.color-picker {
    position: absolute;
    left: 0;
    bottom: 0;
    background-image: url(../img/img-3.jpg);
    background-size: cover;
    box-shadow: inset 0px 0px 10px #ddd;
    border: 1px solid #d1d1d1;
}

.color-item {
    position: absolute;
    top: 10px;
    left: 10px;
    transform: scale(0);
    transition: all .5s;
}

.color-picker-wrap:hover .color-item {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #ddd;
    transform: scale(1);
}

.color-picker-wrap:hover .color-item:nth-child(1) {
    opacity: 1;
    top: 34px;
    left: -35px;
    background-color: #d81e27;
}

.color-picker-wrap:hover .color-item:nth-child(2) {
    opacity: 1;
    top: 0px;
    left: -34px;
    background-color: #f89e2c;
}

.color-picker-wrap:hover .color-item:nth-child(3) {
    opacity: 1;
    top: -28px;
    left: -11px;
    background-color:#f6e20f;
}

.color-picker-wrap:hover .color-item:nth-child(4) {
    opacity: 1;
    top: -34px;
    left: 24px;
    background-color:#97af27;
}

.color-picker-wrap:hover .color-item:nth-child(5) {
    opacity: 1;
    top: -22px;
    left: 58px;
    background-color: #00adcf;
}

.color-picker-wrap:hover .color-item:nth-child(6) {
    opacity: 1;
    top: 6px;
    left: 74px;
    background-color: #2080cd;
}

.color-picker-wrap:hover .color-item:nth-child(7) {
    opacity: 1;
    top: 38px;
    left: 74px;
    background-color: #4c4298;
}

.color-item:nth-child(1) {
    transition-delay: 0.1s;
}

.color-item:nth-child(2) {
    transition-delay: 0.2s;
}

.color-item:nth-child(3) {
    transition-delay: 0.3s;
}

.color-item:nth-child(4) {
    transition-delay: 0.4s;
}

.color-item:nth-child(5) {
    transition-delay: 0.5s;
}

.color-item:nth-child(6) {
    transition-delay: 0.6s;
}

.color-item:nth-child(7) {
    transition-delay: 0.7s;
}
